package util;

import java.io.IOException;
import java.io.OutputStream;

import org.jdom.Document;
import org.jdom.input.DOMBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;

public class DomOutputter {
	public static void write(org.w3c.dom.Document doc, OutputStream out) throws IOException{
		DOMBuilder dombuilder = new DOMBuilder();
		Document jdomdoc = dombuilder.build(doc);
		XMLOutputter xmlOut = new XMLOutputter(Format.getPrettyFormat());
		xmlOut.output(jdomdoc, out);
	}
}
